/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SoOrderChg extends BasicModel<SoOrderChg> {
  soCode?: string; // 订单号
  cusCode?: string; // 客户编码
  bsp?: string; // 首批发货（修改后）
  bspOld?: string; // 首批发货（修改前）
  bby?: string; // 是否包邮（修改后）
  bbyOld?: string; // 是否包邮（修改前）
  cmemo?: string; // 选项备注（修改后）
  cmemoOld?: string; // 选项备注（修改前）
  soOrderChgCList?: any[]; // 子表列表
}

export const soOrderChgList = (params?: SoOrderChg | any) =>
  defHttp.get<SoOrderChg>({ url: adminPath + '/shop/order/soOrderChg/list', params });

export const soOrderChgListData = (params?: SoOrderChg | any) =>
  defHttp.post<Page<SoOrderChg>>({ url: adminPath + '/shop/order/soOrderChg/listData', params });

export const soOrderChgForm = (params?: SoOrderChg | any) =>
  defHttp.get<SoOrderChg>({ url: adminPath + '/shop/order/soOrderChg/form', params });

export const soOrderChgSave = (params?: any, data?: SoOrderChg | any) =>
  defHttp.postJson<SoOrderChg>({ url: adminPath + '/shop/order/soOrderChg/save', params, data });

export const soOrderChgDelete = (params?: SoOrderChg | any) =>
  defHttp.get<SoOrderChg>({ url: adminPath + '/shop/order/soOrderChg/delete', params });
